<link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<script src="js/plugins/sweetalert/sweetalert.min.js"></script>
	  <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>



    <!-- ECharts -->
    <script src="js/plugins/echarts/echarts-all.js"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>


    <!-- ECharts demo data -->
    <script src="js/demo/echarts-demo.js"></script>
<?php
error_reporting(0);
header("Content-Type: text/html; charset=UTF-8");
include('wx_config.php');

 $result=file_get_contents('http://api.weixin.qq.com/cgi-bin/user/info?access_token='.$app.'&openid='.$opid);
  $errjson=json_decode($result)->errcode;
if($errjson==40003){
exit( '<script>$(document).ready(function () { swal({title: 
	"未关注",
                    type: "error"
					
                }, function() {setTimeout(function(){WeixinJSBridge.call("closeWindow");});});
          
        });
    </script>');
}

$result = mysql_query("SELECT * FROM LJ_data WHERE opid  LIKE '$opid'  limit 0,1 ");
            while($row = mysql_fetch_array($result)) 	{
	        $sqlopid=$row['opid'];
				$sqlxm=$row['xm'];
} 
$time=time();
if($sqlopid==$opid){
	exit( '<script>$(document).ready(function () { swal({title: 
	"不要重复提交\\n",
	text:"以下信息为你的简历状态\\n\\n姓名：'.$sqlxm.'\\n申请时间：'.$addtime.'\\n审核状态：'.$sqlzhuangtai.'",
                    type: "error"
					
                }, function() {setTimeout(function(){WeixinJSBridge.call("closeWindow");});});
          
        });
    </script>');
}
$ypgw=$_POST['ypgw'];
	$xm=$_POST['xm'];
$xb=$_POST['xb'];
$csny=$_POST['csny'];
	$zzmm=$_POST['zzmm'];
	$mz=$_POST['mz'];
	$jg=$_POST['jg'];
	$hyzt=$_POST['hyzt'];
	$sg=$_POST['sg'];
	$tz=$_POST['tz'];
	$sfzhm=$_POST['sfzhm'];
	$hkszd=$_POST['hkszd'];
	$xljxw=$_POST['xljxw'];
	$bysj=$_POST['bysj'];
	$xxjzy=$_POST['xxjzy'];
	$txdz=$_POST['txdz'];
	$yb=$_POST['yb'];
	$qwsr=$_POST['qwsr'];
	$zdqwsr=$_POST['zdqwsr'];
	$qsxm=$_POST['qsxm'];
$jl1qzny=$_POST['1qzny'];
$jl1byyx=$_POST['1byyx'];
$jl1sxzy=$_POST['1sxzy'];
$jl1xwxl=$_POST['1xwxl'];
$jl1pyfs=$_POST['1pyfs'];
$jl2qzny=$_POST['2qzny'];
$jl2byyx=$_POST['2byyx'];
$jl2sxzy=$_POST['2sxzy'];
$jl2xwxl=$_POST['2xwxl'];
$jl2pyfs=$_POST['2pyfs'];
$jl3qzny=$_POST['3qzny'];
$jl3byyx=$_POST['3byyx'];
$jl3sxzy=$_POST['3sxzy'];
$jl3xwxl=$_POST['3xwxl'];
$jl3pyfs=$_POST['3pyfs'];
$jl1qzqy1=$_POST['1qzqy1'];
$jl1zyjl=$_POST['1zyjl'];
$jl1cghjx=$_POST['1cghjx'];
$jl1zmr=$_POST['1zmr'];
$jl2qzqy1=$_POST['2qzqy1'];
$jl2zyjl=$_POST['2zyjl'];
$jl2cghjx=$_POST['2cghjx'];
$jl2zmr=$_POST['2zmr'];
$jl3qzqy1=$_POST['3qzqy1'];
$jl3zyjl=$_POST['3zyjl'];
$jl3cghjx=$_POST['3cghjx'];
$jl3zmr=$_POST['3zmr'];
$jl1xm=$_POST['1xm'];
$jl1gx=$_POST['1gx'];
$jl1sr=$_POST['1sr'];
$jl1dw=$_POST['1dw'];
$jl1zw=$_POST['1zw'];
$jl1dh=$_POST['1dh'];
$jl2xm=$_POST['2xm'];
$jl2gx=$_POST['2gx'];
$jl2sr=$_POST['2sr'];
$jl2dw=$_POST['2dw'];
$jl2zw=$_POST['2zw'];
$jl2dh=$_POST['2dh'];
$jl3xm=$_POST['3xm'];
$jl3gx=$_POST['3gx'];
$jl3sr=$_POST['3sr'];
$jl3dw=$_POST['3dw'];
$jl3zw=$_POST['3zw'];
$jl3dh=$_POST['3dh'];

$sql = "REPLACE INTO `lj_data` (`id`,
`opid`,`ypgw`,`xm`,`xb`,`zzmm`,`mz`,`jg`,`hyzt`,`sg`,`tz`,`sfzhm`,`hkszd`,`xljxw`,`bysj`,`xxjzy`,`txdz`,`yb`,`qwsr`,`zdqwsr`,`qsxm`,`1qzny`,
`1byyx`,
`1sxzy`,
`1xwxl`,
`1pyfs`,
`2qzny`,
`2byyx`,
`2sxzy`,
`2xwxl`,
`2pyfs`,
`3qzny`,
`3byyx`,
`3sxzy`,
`3xwxl`,
`3pyfs`,
`1qzqy1`,
`1zyjl`,
`1cghjx`,
`1zmr`,
`2qzqy1`,
`2zyjl`,
`2cghjx`,
`2zmr`,
`3qzqy1`,
`3zyjl`,
`3cghjx`,
`3zmr`,
`1xm`,
`1gx`,
`1sr`,
`1dw`,
`1zw`,
`1dh`,
`2xm`,
`2gx`,
`2sr`,
`2dw`,
`2zw`,
`2dh`,
`3xm`,
`3gx`,
`3sr`,
`3dw`,
`3zw`,
`3dh`,
`zhuangtai`,
`addtime`,`csny`) VALUES ('null','$opid','$ypgw','$xm','$xb','$zzmm','$mz','$jg','$hyzt','$sg','$tz','$sfzhm','$hkszd','$xljxw','$bysj','$xxjzy','$txdz','$yb','$qwsr','$zdqwsr','$qsxm','$jl1qzny','$jl1byyx',
'$jl1sxzy',
'$jl1xwxl',
'$jl1pyfs',
'$jl2qzny',
'$jl2byyx',
'$jl2sxzy',
'$jl2xwxl',
'$jl2pyfs',
'$jl3qzny',
'$jl3byyx',
'$jl3sxzy',
'$jl3xwxl',
'$jl3pyfs',
'$jl1qzqy1',
'$jl1zyjl',
'$jl1cghjx',
'$jl1zmr',
'$jl2qzqy1',
'$jl2zyjl',
'$jl2cghjx',
'$jl2zmr',
'$jl3qzqy1',
'$jl3zyjl',
'$jl3cghjx',
'$jl3zmr',
'$jl1xm',
'$jl1gx',
'$jl1sr',
'$jl1dw',
'$jl1zw',
'$jl1dh',
'$jl2xm',
'$jl2gx',
'$jl2sr',
'$jl2dw',
'$jl2zw',
'$jl2dh',
'$jl3xm',
'$jl3gx',
'$jl3sr',
'$jl3dw',
'$jl3zw',
'$jl3dh','审核中','$time','$csny')";
mysql_query($sql);
$url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=".$app;
$data = '{
    "touser": "'.$opid.'", 
     "msgtype":"news",
    "news":{
        "articles": [
         { "title":"简历创建成功通知",
             "description":"亲爱的'.$xm.'\n\n你于'.date("Y/m/d").'填写的简历已经提交至人事中心审核\n\n无论你的简历通过与否我们都会在本公众号内回复你\n\n还请不要取消关注，谢谢合作\n",
         }]}}';
 $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url); 
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);
curl_close($ch);
exit("<script> alert('亲爱的".$xm."你的过简历提交成功，人事MM正在快马加鞭的审核中，无论审核通过与否我们都会在公众号内回复你，还请不要取消关注谢谢合作');setTimeout(function(){WeixinJSBridge.call('closeWindow');}); </script>");
/*
项目名称：在线简历填写+公众号简历状态实时推送查询系统
微信消息接口开发：@刘继鹏Beta
程序开发：@刘继鹏Beta
前端设计:@刘继鹏Beta
MYSQL：@刘继鹏Beta
开发日期：2017/02/13
*/
?>
